<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TableBankRequestIn class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TableBankRequestIn object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TableBankRequestInMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TableBankRequestIn $TableBankRequestIn the actual TableBankRequestIn data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QIntegerTextBox $CurrencyControl
	 * property-read QLabel $CurrencyLabel
	 * property QIntegerTextBox $AmountControl
	 * property-read QLabel $AmountLabel
	 * property QIntegerTextBox $FeeTakenControl
	 * property-read QLabel $FeeTakenLabel
	 * property QTextBox $UserNameFromControl
	 * property-read QLabel $UserNameFromLabel
	 * property QTextBox $ProcessAdminNameControl
	 * property-read QLabel $ProcessAdminNameLabel
	 * property QDateTimePicker $InDateControl
	 * property-read QLabel $InDateLabel
	 * property QDateTimePicker $RequestDateControl
	 * property-read QLabel $RequestDateLabel
	 * property QDateTimePicker $ProcessDateControl
	 * property-read QLabel $ProcessDateLabel
	 * property QTextBox $ProcessedControl
	 * property-read QLabel $ProcessedLabel
	 * property QTextBox $ActiveControl
	 * property-read QLabel $ActiveLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property QListBox $TransactionIdControl
	 * property-read QLabel $TransactionIdLabel
	 * property QListBox $ProcessTransactionIdControl
	 * property-read QLabel $ProcessTransactionIdLabel
	 * property QTextBox $IpControl
	 * property-read QLabel $IpLabel
	 * property QIntegerTextBox $ActualAmountControl
	 * property-read QLabel $ActualAmountLabel
	 * property QIntegerTextBox $ActualFeeTakenControl
	 * property-read QLabel $ActualFeeTakenLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TableBankRequestInMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTableBankRequestIn;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TableBankRequestIn's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $txtCurrency;
		protected $txtAmount;
		protected $txtFeeTaken;
		protected $txtUserNameFrom;
		protected $txtProcessAdminName;
		protected $calInDate;
		protected $calRequestDate;
		protected $calProcessDate;
		protected $txtProcessed;
		protected $txtActive;
		protected $txtStatus;
		protected $lstTransaction;
		protected $lstProcessTransaction;
		protected $txtIp;
		protected $txtActualAmount;
		protected $txtActualFeeTaken;

		// Controls that allow the viewing of TableBankRequestIn's individual data fields
		protected $lblUserId;
		protected $lblCurrency;
		protected $lblAmount;
		protected $lblFeeTaken;
		protected $lblUserNameFrom;
		protected $lblProcessAdminName;
		protected $lblInDate;
		protected $lblRequestDate;
		protected $lblProcessDate;
		protected $lblProcessed;
		protected $lblActive;
		protected $lblStatus;
		protected $lblTransactionId;
		protected $lblProcessTransactionId;
		protected $lblIp;
		protected $lblActualAmount;
		protected $lblActualFeeTaken;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TableBankRequestInMetaControl to edit a single TableBankRequestIn object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TableBankRequestIn object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableBankRequestInMetaControl
		 * @param TableBankRequestIn $objTableBankRequestIn new or existing TableBankRequestIn object
		 */
		 public function __construct($objParentObject, TableBankRequestIn $objTableBankRequestIn) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TableBankRequestInMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TableBankRequestIn object
			$this->objTableBankRequestIn = $objTableBankRequestIn;

			// Figure out if we're Editing or Creating New
			if ($this->objTableBankRequestIn->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableBankRequestInMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TableBankRequestIn object creation - defaults to CreateOrEdit
 		 * @return TableBankRequestInMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTableBankRequestIn = TableBankRequestIn::Load($intId);

				// TableBankRequestIn was found -- return it!
				if ($objTableBankRequestIn)
					return new TableBankRequestInMetaControl($objParentObject, $objTableBankRequestIn);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TableBankRequestIn object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TableBankRequestInMetaControl($objParentObject, new TableBankRequestIn());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableBankRequestInMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableBankRequestIn object creation - defaults to CreateOrEdit
		 * @return TableBankRequestInMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TableBankRequestInMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableBankRequestInMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableBankRequestIn object creation - defaults to CreateOrEdit
		 * @return TableBankRequestInMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TableBankRequestInMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTableBankRequestIn->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTableBankRequestIn->User) && ($this->objTableBankRequestIn->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTableBankRequestIn->User) ? $this->objTableBankRequestIn->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtCurrency
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtCurrency_Create($strControlId = null) {
			$this->txtCurrency = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtCurrency->Name = QApplication::Translate('Currency');
			$this->txtCurrency->Text = $this->objTableBankRequestIn->Currency;
			return $this->txtCurrency;
		}

		/**
		 * Create and setup QLabel lblCurrency
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblCurrency_Create($strControlId = null, $strFormat = null) {
			$this->lblCurrency = new QLabel($this->objParentObject, $strControlId);
			$this->lblCurrency->Name = QApplication::Translate('Currency');
			$this->lblCurrency->Text = $this->objTableBankRequestIn->Currency;
			$this->lblCurrency->Format = $strFormat;
			return $this->lblCurrency;
		}

		/**
		 * Create and setup QIntegerTextBox txtAmount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAmount_Create($strControlId = null) {
			$this->txtAmount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAmount->Name = QApplication::Translate('Amount');
			$this->txtAmount->Text = $this->objTableBankRequestIn->Amount;
			$this->txtAmount->Required = true;
			return $this->txtAmount;
		}

		/**
		 * Create and setup QLabel lblAmount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAmount_Create($strControlId = null, $strFormat = null) {
			$this->lblAmount = new QLabel($this->objParentObject, $strControlId);
			$this->lblAmount->Name = QApplication::Translate('Amount');
			$this->lblAmount->Text = $this->objTableBankRequestIn->Amount;
			$this->lblAmount->Required = true;
			$this->lblAmount->Format = $strFormat;
			return $this->lblAmount;
		}

		/**
		 * Create and setup QIntegerTextBox txtFeeTaken
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtFeeTaken_Create($strControlId = null) {
			$this->txtFeeTaken = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtFeeTaken->Name = QApplication::Translate('Fee Taken');
			$this->txtFeeTaken->Text = $this->objTableBankRequestIn->FeeTaken;
			$this->txtFeeTaken->Required = true;
			return $this->txtFeeTaken;
		}

		/**
		 * Create and setup QLabel lblFeeTaken
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblFeeTaken_Create($strControlId = null, $strFormat = null) {
			$this->lblFeeTaken = new QLabel($this->objParentObject, $strControlId);
			$this->lblFeeTaken->Name = QApplication::Translate('Fee Taken');
			$this->lblFeeTaken->Text = $this->objTableBankRequestIn->FeeTaken;
			$this->lblFeeTaken->Required = true;
			$this->lblFeeTaken->Format = $strFormat;
			return $this->lblFeeTaken;
		}

		/**
		 * Create and setup QTextBox txtUserNameFrom
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUserNameFrom_Create($strControlId = null) {
			$this->txtUserNameFrom = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUserNameFrom->Name = QApplication::Translate('User Name From');
			$this->txtUserNameFrom->Text = $this->objTableBankRequestIn->UserNameFrom;
			$this->txtUserNameFrom->Required = true;
			$this->txtUserNameFrom->MaxLength = TableBankRequestIn::UserNameFromMaxLength;
			return $this->txtUserNameFrom;
		}

		/**
		 * Create and setup QLabel lblUserNameFrom
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserNameFrom_Create($strControlId = null) {
			$this->lblUserNameFrom = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserNameFrom->Name = QApplication::Translate('User Name From');
			$this->lblUserNameFrom->Text = $this->objTableBankRequestIn->UserNameFrom;
			$this->lblUserNameFrom->Required = true;
			return $this->lblUserNameFrom;
		}

		/**
		 * Create and setup QTextBox txtProcessAdminName
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtProcessAdminName_Create($strControlId = null) {
			$this->txtProcessAdminName = new QTextBox($this->objParentObject, $strControlId);
			$this->txtProcessAdminName->Name = QApplication::Translate('Process Admin Name');
			$this->txtProcessAdminName->Text = $this->objTableBankRequestIn->ProcessAdminName;
			$this->txtProcessAdminName->MaxLength = TableBankRequestIn::ProcessAdminNameMaxLength;
			return $this->txtProcessAdminName;
		}

		/**
		 * Create and setup QLabel lblProcessAdminName
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProcessAdminName_Create($strControlId = null) {
			$this->lblProcessAdminName = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessAdminName->Name = QApplication::Translate('Process Admin Name');
			$this->lblProcessAdminName->Text = $this->objTableBankRequestIn->ProcessAdminName;
			return $this->lblProcessAdminName;
		}

		/**
		 * Create and setup QDateTimePicker calInDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calInDate_Create($strControlId = null) {
			$this->calInDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calInDate->Name = QApplication::Translate('In Date');
			$this->calInDate->DateTime = $this->objTableBankRequestIn->InDate;
			$this->calInDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calInDate;
		}

		/**
		 * Create and setup QLabel lblInDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblInDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblInDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblInDate->Name = QApplication::Translate('In Date');
			$this->strInDateDateTimeFormat = $strDateTimeFormat;
			$this->lblInDate->Text = sprintf($this->objTableBankRequestIn->InDate) ? $this->objTableBankRequestIn->InDate->__toString($this->strInDateDateTimeFormat) : null;
			return $this->lblInDate;
		}

		protected $strInDateDateTimeFormat;


		/**
		 * Create and setup QDateTimePicker calRequestDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calRequestDate_Create($strControlId = null) {
			$this->calRequestDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calRequestDate->Name = QApplication::Translate('Request Date');
			$this->calRequestDate->DateTime = $this->objTableBankRequestIn->RequestDate;
			$this->calRequestDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calRequestDate;
		}

		/**
		 * Create and setup QLabel lblRequestDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblRequestDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblRequestDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblRequestDate->Name = QApplication::Translate('Request Date');
			$this->strRequestDateDateTimeFormat = $strDateTimeFormat;
			$this->lblRequestDate->Text = sprintf($this->objTableBankRequestIn->RequestDate) ? $this->objTableBankRequestIn->RequestDate->__toString($this->strRequestDateDateTimeFormat) : null;
			return $this->lblRequestDate;
		}

		protected $strRequestDateDateTimeFormat;


		/**
		 * Create and setup QDateTimePicker calProcessDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calProcessDate_Create($strControlId = null) {
			$this->calProcessDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calProcessDate->Name = QApplication::Translate('Process Date');
			$this->calProcessDate->DateTime = $this->objTableBankRequestIn->ProcessDate;
			$this->calProcessDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calProcessDate;
		}

		/**
		 * Create and setup QLabel lblProcessDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblProcessDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblProcessDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessDate->Name = QApplication::Translate('Process Date');
			$this->strProcessDateDateTimeFormat = $strDateTimeFormat;
			$this->lblProcessDate->Text = sprintf($this->objTableBankRequestIn->ProcessDate) ? $this->objTableBankRequestIn->ProcessDate->__toString($this->strProcessDateDateTimeFormat) : null;
			return $this->lblProcessDate;
		}

		protected $strProcessDateDateTimeFormat;


		/**
		 * Create and setup QTextBox txtProcessed
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtProcessed_Create($strControlId = null) {
			$this->txtProcessed = new QTextBox($this->objParentObject, $strControlId);
			$this->txtProcessed->Name = QApplication::Translate('Processed');
			$this->txtProcessed->Text = $this->objTableBankRequestIn->Processed;
			$this->txtProcessed->Required = true;
			$this->txtProcessed->MaxLength = TableBankRequestIn::ProcessedMaxLength;
			return $this->txtProcessed;
		}

		/**
		 * Create and setup QLabel lblProcessed
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProcessed_Create($strControlId = null) {
			$this->lblProcessed = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessed->Name = QApplication::Translate('Processed');
			$this->lblProcessed->Text = $this->objTableBankRequestIn->Processed;
			$this->lblProcessed->Required = true;
			return $this->lblProcessed;
		}

		/**
		 * Create and setup QTextBox txtActive
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtActive_Create($strControlId = null) {
			$this->txtActive = new QTextBox($this->objParentObject, $strControlId);
			$this->txtActive->Name = QApplication::Translate('Active');
			$this->txtActive->Text = $this->objTableBankRequestIn->Active;
			$this->txtActive->MaxLength = TableBankRequestIn::ActiveMaxLength;
			return $this->txtActive;
		}

		/**
		 * Create and setup QLabel lblActive
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblActive_Create($strControlId = null) {
			$this->lblActive = new QLabel($this->objParentObject, $strControlId);
			$this->lblActive->Name = QApplication::Translate('Active');
			$this->lblActive->Text = $this->objTableBankRequestIn->Active;
			return $this->lblActive;
		}

		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTableBankRequestIn->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTableBankRequestIn->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}

		/**
		 * Create and setup QListBox lstTransaction
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstTransaction_Create($strControlId = null) {
			$this->lstTransaction = new QListBox($this->objParentObject, $strControlId);
			$this->lstTransaction->Name = QApplication::Translate('Transaction');
			$this->lstTransaction->AddItem(QApplication::Translate('- Select One -'), null);
			$objTransactionArray = TableTransaction::LoadAll();
			if ($objTransactionArray) foreach ($objTransactionArray as $objTransaction) {
				$objListItem = new QListItem($objTransaction->__toString(), $objTransaction->Id);
				if (($this->objTableBankRequestIn->Transaction) && ($this->objTableBankRequestIn->Transaction->Id == $objTransaction->Id))
					$objListItem->Selected = true;
				$this->lstTransaction->AddItem($objListItem);
			}
			return $this->lstTransaction;
		}

		/**
		 * Create and setup QLabel lblTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTransactionId_Create($strControlId = null) {
			$this->lblTransactionId = new QLabel($this->objParentObject, $strControlId);
			$this->lblTransactionId->Name = QApplication::Translate('Transaction');
			$this->lblTransactionId->Text = ($this->objTableBankRequestIn->Transaction) ? $this->objTableBankRequestIn->Transaction->__toString() : null;
			return $this->lblTransactionId;
		}

		/**
		 * Create and setup QListBox lstProcessTransaction
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstProcessTransaction_Create($strControlId = null) {
			$this->lstProcessTransaction = new QListBox($this->objParentObject, $strControlId);
			$this->lstProcessTransaction->Name = QApplication::Translate('Process Transaction');
			$this->lstProcessTransaction->AddItem(QApplication::Translate('- Select One -'), null);
			$objProcessTransactionArray = TableTransaction::LoadAll();
			if ($objProcessTransactionArray) foreach ($objProcessTransactionArray as $objProcessTransaction) {
				$objListItem = new QListItem($objProcessTransaction->__toString(), $objProcessTransaction->Id);
				if (($this->objTableBankRequestIn->ProcessTransaction) && ($this->objTableBankRequestIn->ProcessTransaction->Id == $objProcessTransaction->Id))
					$objListItem->Selected = true;
				$this->lstProcessTransaction->AddItem($objListItem);
			}
			return $this->lstProcessTransaction;
		}

		/**
		 * Create and setup QLabel lblProcessTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProcessTransactionId_Create($strControlId = null) {
			$this->lblProcessTransactionId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessTransactionId->Name = QApplication::Translate('Process Transaction');
			$this->lblProcessTransactionId->Text = ($this->objTableBankRequestIn->ProcessTransaction) ? $this->objTableBankRequestIn->ProcessTransaction->__toString() : null;
			return $this->lblProcessTransactionId;
		}

		/**
		 * Create and setup QTextBox txtIp
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtIp_Create($strControlId = null) {
			$this->txtIp = new QTextBox($this->objParentObject, $strControlId);
			$this->txtIp->Name = QApplication::Translate('Ip');
			$this->txtIp->Text = $this->objTableBankRequestIn->Ip;
			$this->txtIp->MaxLength = TableBankRequestIn::IpMaxLength;
			return $this->txtIp;
		}

		/**
		 * Create and setup QLabel lblIp
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblIp_Create($strControlId = null) {
			$this->lblIp = new QLabel($this->objParentObject, $strControlId);
			$this->lblIp->Name = QApplication::Translate('Ip');
			$this->lblIp->Text = $this->objTableBankRequestIn->Ip;
			return $this->lblIp;
		}

		/**
		 * Create and setup QIntegerTextBox txtActualAmount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtActualAmount_Create($strControlId = null) {
			$this->txtActualAmount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtActualAmount->Name = QApplication::Translate('Actual Amount');
			$this->txtActualAmount->Text = $this->objTableBankRequestIn->ActualAmount;
			$this->txtActualAmount->Required = true;
			return $this->txtActualAmount;
		}

		/**
		 * Create and setup QLabel lblActualAmount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblActualAmount_Create($strControlId = null, $strFormat = null) {
			$this->lblActualAmount = new QLabel($this->objParentObject, $strControlId);
			$this->lblActualAmount->Name = QApplication::Translate('Actual Amount');
			$this->lblActualAmount->Text = $this->objTableBankRequestIn->ActualAmount;
			$this->lblActualAmount->Required = true;
			$this->lblActualAmount->Format = $strFormat;
			return $this->lblActualAmount;
		}

		/**
		 * Create and setup QIntegerTextBox txtActualFeeTaken
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtActualFeeTaken_Create($strControlId = null) {
			$this->txtActualFeeTaken = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtActualFeeTaken->Name = QApplication::Translate('Actual Fee Taken');
			$this->txtActualFeeTaken->Text = $this->objTableBankRequestIn->ActualFeeTaken;
			$this->txtActualFeeTaken->Required = true;
			return $this->txtActualFeeTaken;
		}

		/**
		 * Create and setup QLabel lblActualFeeTaken
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblActualFeeTaken_Create($strControlId = null, $strFormat = null) {
			$this->lblActualFeeTaken = new QLabel($this->objParentObject, $strControlId);
			$this->lblActualFeeTaken->Name = QApplication::Translate('Actual Fee Taken');
			$this->lblActualFeeTaken->Text = $this->objTableBankRequestIn->ActualFeeTaken;
			$this->lblActualFeeTaken->Required = true;
			$this->lblActualFeeTaken->Format = $strFormat;
			return $this->lblActualFeeTaken;
		}



		/**
		 * Refresh this MetaControl with Data from the local TableBankRequestIn object.
		 * @param boolean $blnReload reload TableBankRequestIn from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTableBankRequestIn->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTableBankRequestIn->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTableBankRequestIn->User) && ($this->objTableBankRequestIn->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTableBankRequestIn->User) ? $this->objTableBankRequestIn->User->__toString() : null;

			if ($this->txtCurrency) $this->txtCurrency->Text = $this->objTableBankRequestIn->Currency;
			if ($this->lblCurrency) $this->lblCurrency->Text = $this->objTableBankRequestIn->Currency;

			if ($this->txtAmount) $this->txtAmount->Text = $this->objTableBankRequestIn->Amount;
			if ($this->lblAmount) $this->lblAmount->Text = $this->objTableBankRequestIn->Amount;

			if ($this->txtFeeTaken) $this->txtFeeTaken->Text = $this->objTableBankRequestIn->FeeTaken;
			if ($this->lblFeeTaken) $this->lblFeeTaken->Text = $this->objTableBankRequestIn->FeeTaken;

			if ($this->txtUserNameFrom) $this->txtUserNameFrom->Text = $this->objTableBankRequestIn->UserNameFrom;
			if ($this->lblUserNameFrom) $this->lblUserNameFrom->Text = $this->objTableBankRequestIn->UserNameFrom;

			if ($this->txtProcessAdminName) $this->txtProcessAdminName->Text = $this->objTableBankRequestIn->ProcessAdminName;
			if ($this->lblProcessAdminName) $this->lblProcessAdminName->Text = $this->objTableBankRequestIn->ProcessAdminName;

			if ($this->calInDate) $this->calInDate->DateTime = $this->objTableBankRequestIn->InDate;
			if ($this->lblInDate) $this->lblInDate->Text = sprintf($this->objTableBankRequestIn->InDate) ? $this->objTableBankRequestIn->InDate->__toString($this->strInDateDateTimeFormat) : null;

			if ($this->calRequestDate) $this->calRequestDate->DateTime = $this->objTableBankRequestIn->RequestDate;
			if ($this->lblRequestDate) $this->lblRequestDate->Text = sprintf($this->objTableBankRequestIn->RequestDate) ? $this->objTableBankRequestIn->RequestDate->__toString($this->strRequestDateDateTimeFormat) : null;

			if ($this->calProcessDate) $this->calProcessDate->DateTime = $this->objTableBankRequestIn->ProcessDate;
			if ($this->lblProcessDate) $this->lblProcessDate->Text = sprintf($this->objTableBankRequestIn->ProcessDate) ? $this->objTableBankRequestIn->ProcessDate->__toString($this->strProcessDateDateTimeFormat) : null;

			if ($this->txtProcessed) $this->txtProcessed->Text = $this->objTableBankRequestIn->Processed;
			if ($this->lblProcessed) $this->lblProcessed->Text = $this->objTableBankRequestIn->Processed;

			if ($this->txtActive) $this->txtActive->Text = $this->objTableBankRequestIn->Active;
			if ($this->lblActive) $this->lblActive->Text = $this->objTableBankRequestIn->Active;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTableBankRequestIn->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTableBankRequestIn->Status;

			if ($this->lstTransaction) {
					$this->lstTransaction->RemoveAllItems();
				$this->lstTransaction->AddItem(QApplication::Translate('- Select One -'), null);
				$objTransactionArray = TableTransaction::LoadAll();
				if ($objTransactionArray) foreach ($objTransactionArray as $objTransaction) {
					$objListItem = new QListItem($objTransaction->__toString(), $objTransaction->Id);
					if (($this->objTableBankRequestIn->Transaction) && ($this->objTableBankRequestIn->Transaction->Id == $objTransaction->Id))
						$objListItem->Selected = true;
					$this->lstTransaction->AddItem($objListItem);
				}
			}
			if ($this->lblTransactionId) $this->lblTransactionId->Text = ($this->objTableBankRequestIn->Transaction) ? $this->objTableBankRequestIn->Transaction->__toString() : null;

			if ($this->lstProcessTransaction) {
					$this->lstProcessTransaction->RemoveAllItems();
				$this->lstProcessTransaction->AddItem(QApplication::Translate('- Select One -'), null);
				$objProcessTransactionArray = TableTransaction::LoadAll();
				if ($objProcessTransactionArray) foreach ($objProcessTransactionArray as $objProcessTransaction) {
					$objListItem = new QListItem($objProcessTransaction->__toString(), $objProcessTransaction->Id);
					if (($this->objTableBankRequestIn->ProcessTransaction) && ($this->objTableBankRequestIn->ProcessTransaction->Id == $objProcessTransaction->Id))
						$objListItem->Selected = true;
					$this->lstProcessTransaction->AddItem($objListItem);
				}
			}
			if ($this->lblProcessTransactionId) $this->lblProcessTransactionId->Text = ($this->objTableBankRequestIn->ProcessTransaction) ? $this->objTableBankRequestIn->ProcessTransaction->__toString() : null;

			if ($this->txtIp) $this->txtIp->Text = $this->objTableBankRequestIn->Ip;
			if ($this->lblIp) $this->lblIp->Text = $this->objTableBankRequestIn->Ip;

			if ($this->txtActualAmount) $this->txtActualAmount->Text = $this->objTableBankRequestIn->ActualAmount;
			if ($this->lblActualAmount) $this->lblActualAmount->Text = $this->objTableBankRequestIn->ActualAmount;

			if ($this->txtActualFeeTaken) $this->txtActualFeeTaken->Text = $this->objTableBankRequestIn->ActualFeeTaken;
			if ($this->lblActualFeeTaken) $this->lblActualFeeTaken->Text = $this->objTableBankRequestIn->ActualFeeTaken;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEBANKREQUESTIN OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TableBankRequestIn instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTableBankRequestIn() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTableBankRequestIn->UserId = $this->lstUser->SelectedValue;
				if ($this->txtCurrency) $this->objTableBankRequestIn->Currency = $this->txtCurrency->Text;
				if ($this->txtAmount) $this->objTableBankRequestIn->Amount = $this->txtAmount->Text;
				if ($this->txtFeeTaken) $this->objTableBankRequestIn->FeeTaken = $this->txtFeeTaken->Text;
				if ($this->txtUserNameFrom) $this->objTableBankRequestIn->UserNameFrom = $this->txtUserNameFrom->Text;
				if ($this->txtProcessAdminName) $this->objTableBankRequestIn->ProcessAdminName = $this->txtProcessAdminName->Text;
				if ($this->calInDate) $this->objTableBankRequestIn->InDate = $this->calInDate->DateTime;
				if ($this->calRequestDate) $this->objTableBankRequestIn->RequestDate = $this->calRequestDate->DateTime;
				if ($this->calProcessDate) $this->objTableBankRequestIn->ProcessDate = $this->calProcessDate->DateTime;
				if ($this->txtProcessed) $this->objTableBankRequestIn->Processed = $this->txtProcessed->Text;
				if ($this->txtActive) $this->objTableBankRequestIn->Active = $this->txtActive->Text;
				if ($this->txtStatus) $this->objTableBankRequestIn->Status = $this->txtStatus->Text;
				if ($this->lstTransaction) $this->objTableBankRequestIn->TransactionId = $this->lstTransaction->SelectedValue;
				if ($this->lstProcessTransaction) $this->objTableBankRequestIn->ProcessTransactionId = $this->lstProcessTransaction->SelectedValue;
				if ($this->txtIp) $this->objTableBankRequestIn->Ip = $this->txtIp->Text;
				if ($this->txtActualAmount) $this->objTableBankRequestIn->ActualAmount = $this->txtActualAmount->Text;
				if ($this->txtActualFeeTaken) $this->objTableBankRequestIn->ActualFeeTaken = $this->txtActualFeeTaken->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TableBankRequestIn object
				$this->objTableBankRequestIn->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TableBankRequestIn instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTableBankRequestIn() {
			$this->objTableBankRequestIn->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TableBankRequestIn': return $this->objTableBankRequestIn;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TableBankRequestIn fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'CurrencyControl':
					if (!$this->txtCurrency) return $this->txtCurrency_Create();
					return $this->txtCurrency;
				case 'CurrencyLabel':
					if (!$this->lblCurrency) return $this->lblCurrency_Create();
					return $this->lblCurrency;
				case 'AmountControl':
					if (!$this->txtAmount) return $this->txtAmount_Create();
					return $this->txtAmount;
				case 'AmountLabel':
					if (!$this->lblAmount) return $this->lblAmount_Create();
					return $this->lblAmount;
				case 'FeeTakenControl':
					if (!$this->txtFeeTaken) return $this->txtFeeTaken_Create();
					return $this->txtFeeTaken;
				case 'FeeTakenLabel':
					if (!$this->lblFeeTaken) return $this->lblFeeTaken_Create();
					return $this->lblFeeTaken;
				case 'UserNameFromControl':
					if (!$this->txtUserNameFrom) return $this->txtUserNameFrom_Create();
					return $this->txtUserNameFrom;
				case 'UserNameFromLabel':
					if (!$this->lblUserNameFrom) return $this->lblUserNameFrom_Create();
					return $this->lblUserNameFrom;
				case 'ProcessAdminNameControl':
					if (!$this->txtProcessAdminName) return $this->txtProcessAdminName_Create();
					return $this->txtProcessAdminName;
				case 'ProcessAdminNameLabel':
					if (!$this->lblProcessAdminName) return $this->lblProcessAdminName_Create();
					return $this->lblProcessAdminName;
				case 'InDateControl':
					if (!$this->calInDate) return $this->calInDate_Create();
					return $this->calInDate;
				case 'InDateLabel':
					if (!$this->lblInDate) return $this->lblInDate_Create();
					return $this->lblInDate;
				case 'RequestDateControl':
					if (!$this->calRequestDate) return $this->calRequestDate_Create();
					return $this->calRequestDate;
				case 'RequestDateLabel':
					if (!$this->lblRequestDate) return $this->lblRequestDate_Create();
					return $this->lblRequestDate;
				case 'ProcessDateControl':
					if (!$this->calProcessDate) return $this->calProcessDate_Create();
					return $this->calProcessDate;
				case 'ProcessDateLabel':
					if (!$this->lblProcessDate) return $this->lblProcessDate_Create();
					return $this->lblProcessDate;
				case 'ProcessedControl':
					if (!$this->txtProcessed) return $this->txtProcessed_Create();
					return $this->txtProcessed;
				case 'ProcessedLabel':
					if (!$this->lblProcessed) return $this->lblProcessed_Create();
					return $this->lblProcessed;
				case 'ActiveControl':
					if (!$this->txtActive) return $this->txtActive_Create();
					return $this->txtActive;
				case 'ActiveLabel':
					if (!$this->lblActive) return $this->lblActive_Create();
					return $this->lblActive;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				case 'TransactionIdControl':
					if (!$this->lstTransaction) return $this->lstTransaction_Create();
					return $this->lstTransaction;
				case 'TransactionIdLabel':
					if (!$this->lblTransactionId) return $this->lblTransactionId_Create();
					return $this->lblTransactionId;
				case 'ProcessTransactionIdControl':
					if (!$this->lstProcessTransaction) return $this->lstProcessTransaction_Create();
					return $this->lstProcessTransaction;
				case 'ProcessTransactionIdLabel':
					if (!$this->lblProcessTransactionId) return $this->lblProcessTransactionId_Create();
					return $this->lblProcessTransactionId;
				case 'IpControl':
					if (!$this->txtIp) return $this->txtIp_Create();
					return $this->txtIp;
				case 'IpLabel':
					if (!$this->lblIp) return $this->lblIp_Create();
					return $this->lblIp;
				case 'ActualAmountControl':
					if (!$this->txtActualAmount) return $this->txtActualAmount_Create();
					return $this->txtActualAmount;
				case 'ActualAmountLabel':
					if (!$this->lblActualAmount) return $this->lblActualAmount_Create();
					return $this->lblActualAmount;
				case 'ActualFeeTakenControl':
					if (!$this->txtActualFeeTaken) return $this->txtActualFeeTaken_Create();
					return $this->txtActualFeeTaken;
				case 'ActualFeeTakenLabel':
					if (!$this->lblActualFeeTaken) return $this->lblActualFeeTaken_Create();
					return $this->lblActualFeeTaken;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TableBankRequestIn fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'CurrencyControl':
						return ($this->txtCurrency = QType::Cast($mixValue, 'QControl'));
					case 'AmountControl':
						return ($this->txtAmount = QType::Cast($mixValue, 'QControl'));
					case 'FeeTakenControl':
						return ($this->txtFeeTaken = QType::Cast($mixValue, 'QControl'));
					case 'UserNameFromControl':
						return ($this->txtUserNameFrom = QType::Cast($mixValue, 'QControl'));
					case 'ProcessAdminNameControl':
						return ($this->txtProcessAdminName = QType::Cast($mixValue, 'QControl'));
					case 'InDateControl':
						return ($this->calInDate = QType::Cast($mixValue, 'QControl'));
					case 'RequestDateControl':
						return ($this->calRequestDate = QType::Cast($mixValue, 'QControl'));
					case 'ProcessDateControl':
						return ($this->calProcessDate = QType::Cast($mixValue, 'QControl'));
					case 'ProcessedControl':
						return ($this->txtProcessed = QType::Cast($mixValue, 'QControl'));
					case 'ActiveControl':
						return ($this->txtActive = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					case 'TransactionIdControl':
						return ($this->lstTransaction = QType::Cast($mixValue, 'QControl'));
					case 'ProcessTransactionIdControl':
						return ($this->lstProcessTransaction = QType::Cast($mixValue, 'QControl'));
					case 'IpControl':
						return ($this->txtIp = QType::Cast($mixValue, 'QControl'));
					case 'ActualAmountControl':
						return ($this->txtActualAmount = QType::Cast($mixValue, 'QControl'));
					case 'ActualFeeTakenControl':
						return ($this->txtActualFeeTaken = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>